home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TTimeSchedulerExample.h
-
- Contains: Declaration for TAlert, a TOperation subclass. TOperation objects
- contain the implementation of the task to be performed. This operation
- is placed on TTimeScheduler to be performed after a certain amount of
- time passes. TAlert's operation is to sound two beeps to informing the
- user that it has fired.
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #ifndef __TTASKSCHEDULEREXAMPLE__
- #define __TTASKSCHEDULEREXAMPLE__
-
- #ifndef __OSUTILS__
- #include <osutils.h>
- #endif
-
- ///————————————————————————————————————————————————————————————————————————————————————
- /// TAlert
- ///————————————————————————————————————————————————————————————————————————————————————
-
- class TAlert : public TOperation {
- public:
- TAlert(); // Constructor
- virtual ~TAlert(); // Destructor
- virtual void Process(); // Override
- Boolean GetDone() { return fDone; };
- private:
- Boolean fDone;
- };
-
- ///————————————————————————————————————————————————————————————————————————————————————
- /// TAlert IMPLEMENTATION
- ///————————————————————————————————————————————————————————————————————————————————————
-
- TAlert::TAlert()
- {
- fDone = false;
- }
-
- TAlert::~TAlert()
- {
- }
-
- void TAlert::Process()
- {
- fDone = true;
- }
-
- #endif